package io.gitee.zhangbinhub.acp.cloud.resource.server.conf;

import io.gitee.zhangbinhub.acp.cloud.resource.server.constant.AcpCloudResourceServerConstant;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.ArrayList;
import java.util.List;

@ConfigurationProperties(prefix = AcpCloudResourceServerConstant.PROPERTIES_PREFIX)
public class AcpCloudResourceServerConfiguration {
    public String getClientId() {
        return clientId;
    }

    public void setClientId(String clientId) {
        this.clientId = clientId;
    }

    public String getClientSecret() {
        return clientSecret;
    }

    public void setClientSecret(String clientSecret) {
        this.clientSecret = clientSecret;
    }

    public List<String> getPermitAllPath() {
        return permitAllPath;
    }

    public void setPermitAllPath(List<String> permitAllPath) {
        this.permitAllPath = permitAllPath;
    }

    public List<String> getSecurityPath() {
        return securityPath;
    }

    public void setSecurityPath(List<String> securityPath) {
        this.securityPath = securityPath;
    }

    /**
     * 资源服务认证使用的clientId
     */
    private String clientId = AcpCloudResourceServerConstant.CLIENT_ID;

    /**
     * 资源服务认证使用的clientSecret
     */
    private String clientSecret = AcpCloudResourceServerConstant.CLIENT_SECRET;

    /**
     * 不进行权限校验的 url path
     */
    private List<String> permitAllPath = new ArrayList<>();

    /**
     * 进行权限保护的 url path
     */
    private List<String> securityPath = new ArrayList<>();
}
